package com.hzlj.position.locate.common.enums;

import com.fz.common.base.exception.PubError;
import com.fz.common.base.exception.PubException;
import lombok.Getter;

/**
 * @author lifh
 * @date 2021/11/9 上午11:59
 **/
@Getter
public enum AbnMissingCheckStatus {
    WAIT("0", "待核查"),
    JZRY_WAIT("1", "通知矫正对象-待上报"),
    JZRY_REPORT("2", "通知矫正对象-已上报（核查成功）"),
    JJLXR_WAIT("3", "通知紧急联系人-待上报"),
    JJLXR_NOT_REPORT("4", "通知紧急联系人-未上报（核查失败）"),
    JJLXR_REPORT("5", "通知紧急联系人-已上报（核查成功）"),
    ;

    private final String status;
    private final String statusText;

    AbnMissingCheckStatus(String status, String statusText) {
        this.status = status;
        this.statusText = statusText;
    }

    public static AbnMissingCheckStatus of(String status) {
        for (AbnMissingCheckStatus statusEnum : values()) {
            if (statusEnum.status.equalsIgnoreCase(status)) {
                return statusEnum;
            }
        }
        throw new PubException(PubError.PARAM_EMPTY_ERROR);
    }
}
